package com.heima.tess4j;

import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

public class Application {
    public static void main(String[] args) throws TesseractException {
        File file = new File("E:\\app\\web执行流程.bmp");

        Tesseract tesseract = new Tesseract();

        tesseract.setDatapath("E:\\app\\tessdata");

        tesseract.setLanguage("chi_sim");

        String result = tesseract.doOCR(file);

//        result = result.replaceAll("\\r||\\n", "-");

        System.out.println("result = " + result);

    }
}
